package com.medical.medical.service;

import com.medical.medical.entity.Record;
import com.medical.medical.mapper.RecordMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @authorDesc 你相信光吗？
 * @author GUOYN
 * @date 2022-09-14 09:47:08
 * @version 1.0.0
 * @description 用户/患者业务逻辑层实现类
 */
@Service
@Slf4j
public class RecordServiceImpl implements RecordService {
    @Resource
    private RecordMapper recordMapper;

    @Override
    public List<Record> getReport(int id,int start,int pageSize) {
        List<Record> recordList = recordMapper.getReport(id,start,pageSize);
        return recordList;
    }

    @Override
    public int getState(int id) {
        int state = recordMapper.getState(id);
        return state;
    }

    @Override
    public Record viewByRecordOrdinal(long recordOrdinal) {
        Record record = recordMapper.viewByRecordOrdinal(recordOrdinal);
        return record;
    }

    @Override
    public int getRecordAllCount(int id) {
        int allCount = recordMapper.getRecordAllCount(id);
        return allCount;
    }
}
